import { FILTER_TYPE_SELECT, FILTER_TYPE_DATE_PICK } from '@/components/Custom/CommonFilter/Constant'
import { getArrayFromMap, CHANNEL_STATUS_MAP } from '../../../utils/utils'

export default {
  data() {
    return {
      filterConfig: {
        filterItemList: [
          {
            prop: 'distributionNo',
            label: '订单编号',
            placeholder: '订单编号/商品编码'
          },
          {
            prop: 'creatUser',
            label: '操作人',
            placeholder: '输入操作人'
          },
          {
            prop: 'submitTime',
            label: '选择时间',
            placeholder: '选择日期时间',
            format: 'yyyy-MM-dd HH:mm:ss',
            type: FILTER_TYPE_DATE_PICK
          },
          {
            prop: 'status',
            label: '订单状态',
            placeholder: '请选择',
            type: FILTER_TYPE_SELECT,
            clearable: true,
            options: getArrayFromMap(CHANNEL_STATUS_MAP)
          }
        ],
        buttons: [
          {
            type: 'primary',
            text: '查询',
            emit: 'search-query'
          },
          {
            text: '重置'
          }
        ]
      },
      filterForm: {
        distributionNo: '',
        creatUser: '',
        submitTime: '',
        status: ''
      }
    }
  }
}
